package com.yxjx.duoxue.my;

import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnLongClickListener;

import com.yxjx.duoxue.BaseActionBarActivity;
import com.yxjx.duoxue.GuidingActivity;
import com.yxjx.duoxue.GuidingScoreDialog;
import com.yxjx.duoxue.R;
import com.yxjx.duoxue.Yx;
import com.yxjx.duoxue.ad.AdPageActivity;
import com.yxjx.duoxue.mta.stat.StatHelper;
import com.yxjx.duoxue.network.UserLoginResponse;
import com.yxjx.duoxue.utils.UIHelper;
import com.yxjx.duoxue.utils.Utils;

public class AboutUsActivity extends BaseActionBarActivity {
	
	// 机构合作申请
	private static final String URL_SCHOOL_REQUEST = "http://service.learnmore.com.cn/signup.shtml";
	private Context mContext;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fragment_about_us);
		customizeActionBarTitle("关于我们");
		mContext = this;
		UIHelper.setText(findViewById(R.id.scroll), R.id.app_version, 
				getResources().getString(R.string.app_name) + " " + Utils.getAppVersionName(this));
		
		UIHelper.setClickListener(findViewById(R.id.scroll), R.id.school_sign, new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				StatHelper.addKVEvent(mContext, "event_corporate_request_open");
				Intent intent = new Intent(AboutUsActivity.this, AdPageActivity.class);
				intent.putExtra(Yx.KEY_TITLE, getResources().getString(R.string.about_us_ask_cooperation));
				intent.putExtra(Yx.KEY_URL, URL_SCHOOL_REQUEST);
				startActivity(intent);
			}
		});
		
		findViewById(R.id.icon).setOnLongClickListener(new OnLongClickListener() {
			
			@Override
			public boolean onLongClick(View arg0) {
				UIHelper.showTips(arg0, "" + Utils.getChannelCode(AboutUsActivity.this));
				return false;
			}
		});
	}
	
}
